package kr.hkit.powerjava.chapter12;

public  class Rectangle extends Shape1 {
	private int width ;
	private int height;
	@Override
	public void draw() {
		System.out.println("사격형을 그림");
	}
	public static void main(String[] args) {
		Shape1[] arrShape = new Shape1[2];
		arrShape[0] = new Rectangle();
		arrShape[1] = new Triangle();
		
		for(Shape1 sh : arrShape){
			sh.draw();
		}
	}
}

class Triangle extends Shape1{

	@Override
	public void draw() {
		System.out.println("삼각형을 그림");
	}
	
}
